<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\components;

/**
 * Description of ActiveField
 *
 * @author song_win81
 */
class ActiveField  extends \yii\widgets\ActiveField{
    //put your code here
  public $template = "{label}\n<div class='col-sm-8'>{input}</div>\n{hint}\n{error}";
  
  public $labelOptions = ['class' => 'col-sm-2 control-label'];
/**
     * @var array the default options for the error tags. The parameter passed to [[error()]] will be
     * merged with this property when rendering the error tag.
     * The following special options are recognized:
     *
     * - tag: the tag name of the container element. Defaults to "div".
     * - encode: whether to encode the error output. Defaults to true.
     *
     * If you set a custom `id` for the error element, you may need to adjust the [[$selectors]] accordingly.
     *
     * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
     */
    public $errorOptions = ['class' => 'col-sm-2 help-block'];
}
